/**
 * Copyright (c) Css Team
 * All rights reserved.
 *
 * This file GetPost.java 
 * http://www.css.com.cn
 */

package com.css.apps.base.post.action;

import com.css.apps.base.common.Constants;
import com.css.apps.base.post.model.SPost;
import com.css.db.query.QueryCache;
import com.css.util.RegexCheck;
import com.css.util.StringHelper;
import com.css.webbase.webwork.action.AdminAction;
import com.opensymphony.xwork.Action;

/**
 * <p>
 * 获得单个岗位
 * </p>
 * 
 */
@SuppressWarnings("serial")
public class GetPost extends AdminAction {

	private String uuid;
	private SPost item;

	@Override
	protected String adminGo() {
		if (!StringHelper.isEmpty(uuid)) {
			item = QueryCache.get(SPost.class, uuid);
			if (StringHelper.isNotEmpty(item.getRemark())) {
				String str = RegexCheck.TagReverse(item.getRemark());
				item.setRemark(str);
			}

		} else {
			item = new SPost();
			item.setGroupFlag(Constants.NO);
			item.setOrderNum(100);
		}
		return Action.SUCCESS;
	}

	public String getUuid() {
		return uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	public SPost getItem() {
		return item;
	}

	public void setItem(SPost item) {
		this.item = item;
	}

}
